import java.util.Arrays;
import java.util.Random;

public class 随机数 {
    public static void main(String[] args) {
        int []x=new int[10];
        for (int j=0;j<x.length;j++){
            Random random=new Random();
            x[j]=random.nextInt(100)+1;
        }
        System.out.println(Arrays.toString(x));
        int []temp=new int[x.length];
        for (int i = 0; i <10; i++){
            for (int t=0;t<=i;t++){
                if(x[i]!=x[t]){
                    temp[i-1]= x[i-1];

                }
            }


        }  System.out.println(Arrays.toString(temp));



    }
}
